package com.swh.cloud.biz.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.swh.cloud.biz.dao.IUserDao;
import com.swh.cloud.biz.service.IUserService;
import com.swh.user.domain.UserEntity;

/**
 * User持久化操作处理实现类
 * @author sangwenhao-桑文豪
 * @date 2016年2月24日 下午10:51:28
 */
//@Service
@Transactional
public class UserService implements IUserService {
	
	@Autowired
	private IUserDao userDao ;

	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public boolean save(UserEntity entity) {
		return userDao.save(entity);
	}

	@Override
	public boolean delete(String uuid) {
		return userDao.delete(uuid);
	}

	@Override
	public int update(UserEntity entity) {
		return userDao.update(entity);
	}

	@Override
	public UserEntity getById(Long id) {
		return userDao.getById(id);
	}

	@Override
	public List<UserEntity> getByIds(List<String> ids) {
		return userDao.getByIds(ids);
	}

	@Override
	public UserEntity queryByEntity(UserEntity entity) {
		return userDao.queryByEntity(entity);
	}

	@Override
	public List<UserEntity> getUserByUnion(Map<String, UserEntity> paraMap) {
		
		return userDao.getUserByUnion(paraMap);
	}

}
